/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package cn.edu.zut.jdbcpool.util;

/**
 *
 * @author jyc
 */
public class LogUtils {
    private static final String DATE_PATTERN = "yyyy-MM-dd HH:mm:ss";
    
    public static void warn(String msg) {
        System.out.println(getTime() + " [WARN ] " + msg);
    }
    
    public static void debug(String msg) {
        System.out.println(getTime() + " [DEBUG] " + msg);
    }
    
    public static void info(String msg) {
        System.out.println(getTime() + " [INFO ] " + msg);
    }
    
    public static void error(String msg) {
        System.out.println(getTime() + " [ERROR] " + msg);
    }
    
    private static String getTime() {
        return DateUtils.formatNow(DATE_PATTERN);
    }
}
